package test;

import java.util.Random;

public class PhoneGenerator {

	public static String generate(){
		String samplePhone = "";
		int phoneArea = 0, phoneCity = 0, phoneLocation = 0;
		Random generator = new Random();
		while (phoneArea < 100) {
			phoneArea = generator.nextInt();
			phoneArea = phoneArea % 1000;
		}
		
		while (phoneCity < 100) {
			phoneCity = generator.nextInt();
			phoneCity = phoneCity % 1000;
		}
		
		while(phoneLocation < 1000) {
			phoneLocation = generator.nextInt();
			phoneLocation = phoneLocation % 10000;
		}
		
		samplePhone = phoneArea + "-" + phoneCity + "-" + phoneLocation;

		return samplePhone;
	}
}
